package com.ylb.rent.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 import com.ylb.rent.dao.ApartmentSecurityMapper;
import  com.ylb.rent.entity.ApartmentSecurity;
import com.ylb.rent.service.IApartmentSecurityService;

/**
 * 公寓安全保障Service业务层处理
 * 
 * @author ylb
 * @date 2023-06-29
 */
@Service
public class ApartmentSecurityServiceImpl implements IApartmentSecurityService 
{
    @Autowired
    private ApartmentSecurityMapper apartmentSecurityMapper;

    /**
     * 查询公寓安全保障
     * 
     * @param id 公寓安全保障主键
     * @return 公寓安全保障
     */
    @Override
    public ApartmentSecurity selectApartmentSecurityById(Long id)
    {
        return apartmentSecurityMapper.selectApartmentSecurityById(id);
    }

    /**
     * 查询公寓安全保障列表
     * 
     * @param apartmentSecurity 公寓安全保障
     * @return 公寓安全保障
     */
    @Override
    public List<ApartmentSecurity> selectApartmentSecurityList(ApartmentSecurity apartmentSecurity)
    {
        return apartmentSecurityMapper.selectApartmentSecurityList(apartmentSecurity);
    }

    /**
     * 新增公寓安全保障
     * 
     * @param apartmentSecurity 公寓安全保障
     * @return 结果
     */
    @Override
    public int insertApartmentSecurity(ApartmentSecurity apartmentSecurity)
    {
        return apartmentSecurityMapper.insertApartmentSecurity(apartmentSecurity);
    }

    /**
     * 修改公寓安全保障
     * 
     * @param apartmentSecurity 公寓安全保障
     * @return 结果
     */
    @Override
    public int updateApartmentSecurity(ApartmentSecurity apartmentSecurity)
    {
        return apartmentSecurityMapper.updateApartmentSecurity(apartmentSecurity);
    }

    /**
     * 批量删除公寓安全保障
     * 
     * @param ids 需要删除的公寓安全保障主键
     * @return 结果
     */
    @Override
    public int deleteApartmentSecurityByIds(Long[] ids)
    {
        return apartmentSecurityMapper.deleteApartmentSecurityByIds(ids);
    }

    /**
     * 删除公寓安全保障信息
     * 
     * @param id 公寓安全保障主键
     * @return 结果
     */
    @Override
    public int deleteApartmentSecurityById(Long id)
    {
        return apartmentSecurityMapper.deleteApartmentSecurityById(id);
    }
}
